package com.foreknow.elm.dao;

import com.foreknow.elm.po.Cart;

import java.util.List;

public interface CartDao {
    /**
     * 添加购物车
     * @param cart
     * @return
     * @throws Exception
     */
    public int saveCart(Cart cart) throws Exception;

    /**
     * 根据用户编号、商家编号、食品编号更新数量
     * @param cart
     * @return
     * @throws Exception
     */
    public  int updateCart(Cart cart) throws Exception;

    /**
     * 删除购物车
     * @param cart
     * @return
     * @throws Exception
     */
    public int removeCart(Cart cart) throws Exception;

    /**
     * 查询购物车列表
     * @param cart
     * @return
     * @throws Exception
     */
    public List<Cart> listCart(Cart cart) throws Exception;
}
